import time
from time import sleep
from selenium import webdriver
# 选项对象,添加参数
options = webdriver.ChromeOptions()
options.add_argument('-headless')
# 打开浏览器.设置选项
driver = webdriver.Chrome(options=options)
# 输入网址
driver.get('https://www.so.com')
# 打印title
print(driver.title)
# 关闭浏览器
time.sleep(3)
driver.quit()


